Optimal. Leaf size=52 \[ \frac {(a B+A b) \sin ^2(c+d x)}{2 d}+\frac {a A \sin (c+d x)}{d}+\frac {b B \sin ^3(c+d x)}{3 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.05, antiderivative size = 52, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.074, Rules used = {2833, 43} \[ \frac {(a B+A b) \sin ^2(c+d x)}{2 d}+\frac {a A \sin (c+d x)}{d}+\frac {b B \sin ^3(c+d x)}{3 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 43
Rule 2833
Rubi steps
\begin {align*} \int \cos (c+d x) (a+b \sin (c+d x)) (A+B \sin (c+d x)) \, dx &=\frac {\operatorname {Subst}\left (\int (a+x) \left (A+\frac {B x}{b}\right ) \, dx,x,b \sin (c+d x)\right )}{b d}\\ &=\frac {\operatorname {Subst}\left (\int \left (a A+\frac {(A b+a B) x}{b}+\frac {B x^2}{b}\right ) \, dx,x,b \sin (c+d x)\right )}{b d}\\ &=\frac {a A \sin (c+d x)}{d}+\frac {(A b+a B) \sin ^2(c+d x)}{2 d}+\frac {b B \sin ^3(c+d x)}{3 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.08, size = 45, normalized size = 0.87 \[ \frac {\sin (c+d x) \left (3 (a B+A b) \sin (c+d x)+6 a A+2 b B \sin ^2(c+d x)\right )}{6 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.43, size = 51, normalized size = 0.98 \[ -\frac {3 \, {\left (B a + A b\right )} \cos \left (d x + c\right )^{2} + 2 \, {\left (B b \cos \left (d x + c\right )^{2} - 3 \, A a - B b\right )} \sin \left (d x + c\right )}{6 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.16, size = 52, normalized size = 1.00 \[ \frac {2 \, B b \sin \left (d x + c\right )^{3} + 3 \, B a \sin \left (d x + c\right )^{2} + 3 \, A b \sin \left (d x + c\right )^{2} + 6 \, A a \sin \left (d x + c\right )}{6 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.22, size = 44, normalized size = 0.85 \[ \frac {\frac {B \left (\sin ^{3}\left (d x +c \right )\right ) b}{3}+\frac {\left (A b +a B \right ) \left (\sin ^{2}\left (d x +c \right )\right )}{2}+A \sin \left (d x +c \right ) a}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.32, size = 45, normalized size = 0.87 \[ \frac {2 \, B b \sin \left (d x + c\right )^{3} + 6 \, A a \sin \left (d x + c\right ) + 3 \, {\left (B a + A b\right )} \sin \left (d x + c\right )^{2}}{6 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 12.04, size = 44, normalized size = 0.85 \[ \frac {\frac {B\,b\,{\sin \left (c+d\,x\right )}^3}{3}+\left (\frac {A\,b}{2}+\frac {B\,a}{2}\right )\,{\sin \left (c+d\,x\right )}^2+A\,a\,\sin \left (c+d\,x\right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.48, size = 75, normalized size = 1.44 \[ \begin {cases} \frac {A a \sin {\left (c + d x \right )}}{d} - \frac {A b \cos ^{2}{\left (c + d x \right )}}{2 d} - \frac {B a \cos ^{2}{\left (c + d x \right )}}{2 d} + \frac {B b \sin ^{3}{\left (c + d x \right )}}{3 d} & \text {for}\: d \neq 0 \\x \left (A + B \sin {\relax (c )}\right ) \left (a + b \sin {\relax (c )}\right ) \cos {\relax (c )} & \text {otherwise} \end {cases} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________